package com.front.teacher.teacherapp.view.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/11.
 */
public class TabEvaluateAdapter extends FragmentPagerAdapter {
    private List<Fragment> fragments ;
    private String[] arrTitle;
    public TabEvaluateAdapter(FragmentManager fm,List<Fragment> fragments,String[] arrTitle) {
        super(fm);
        this.fragments = fragments;
        this.arrTitle = arrTitle;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return arrTitle[position];
    }
}
